Previous Book Contents Book Index Next

Inside Macintosh: QuickTime /
Chapter 3 - Image Compression Manager / Image Compression Manager Reference
Image Compression Manager Functions / Changing Sequence-Compression Parameters


SetCSequencePrev

The SetCSequencePrev function allows the application to set the pixel map and boundary rectangle used by the previous frame in temporal compression. This is useful if the application that is compressing has multiple buffers and wants to update the previous frame by switching buffer pointers instead of copying the data. Usually, the Image Compression Manager allocates the previous buffer for temporal compression. Under normal circumstances, the compressor component or the Image Compression Manager updates the contents of the buffer by copying each frame into the buffer after it is compressed.

This is a very specialized function--your application should not need to call it under most circumstances.

pascal OSErr SetCSequencePrev (ImageSequence seqID, 
                               PixMapHandle prev, 
                               const Rect *prevRect);
seqID
Contains the unique sequence identifier that was returned by the CompressSequenceBegin function (described on page 3-100).
prev
Contains a handle to the new previous image buffer. The compressor uses this buffer to store a previous image against which the current image (stored in the buffer referred to by the src parameter to the CompressSequenceBegin function) is compared when performing temporal compression. You must allocate this buffer using the same pixel depth and color table as the source image buffer that you specify with the src parameter when you call the CompressSequenceBegin function (described on page 3-100). The compressor manages the contents of this buffer based upon several considerations, such as the key frame rate and the degree of difference between compared images.
prevRect
Contains a pointer to a rectangle defining the portion of the previous image to use for temporal compression. The compressor uses this portion of the previous image as the basis of comparison with the current image. This rectangle must be the same size as the source rectangle you specify with the srcRect parameter to the CompressSequenceBegin function. To get the boundary of a source pixel map, set this parameter to nil.
DESCRIPTION
When you start compressing a sequence, you may assign a previous frame buffer and rectangle with the prev and prevRect parameters to the CompressSequenceBegin function, respectively. If you specified a nil value for the prev parameter, the compressor allocates an offscreen buffer for the previous frame. In either case you may use this function to assign a new previous frame buffer.

RESULT CODES
noErr0No error
paramErr-50Invalid parameter specified
Memory Manager errors


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996